package io.demo02;

import java.io.FileReader;
import java.io.IOException;
import java.io.Reader;

/**
 * @author cyt
 * @create 2020-02-25 14:11
 */
public class ReadDemo {
    static Reader reader = null;

    public static void main(String[] args) throws IOException {
        reader = new FileReader("f:\\write.txt");
        char[] chars = new char[1024];

        int length = 0;
        StringBuffer sb = new StringBuffer();
        while ((length = reader.read(chars)) != -1) {
            sb.append(chars);
        }

        System.out.println("" + sb.toString());

        System.out.println(Runtime.getRuntime());
    }
}
